Python code runs
in the context of a virtual environment that
defines the version of the Python runtime to
be used as well as the installed packages
available to the code. In most Python installations, packages are installed
and managed in environments using Conda or Pip. To improve portability, we
usually create environments in docker containers that
are in turn hosted in Compute targets such as
your development computer, virtual machines, or
clusters in the Cloud. In general, Azure
Machine Learning handles environment creation and
package installation for you, usually through the creation
of docker containers. You can specify the Conda
or Pip packages you need, and have Azure Machine
Learning create an environment for
the experiment. In an enterprise machine
learning solution, where experiments may be run in a variety of compute contexts, it can be important
to be aware of the environments in which your experiment code is running. Environments are encapsulated
by the environment class, which you can use to
create environments and specify runtime configuration
for an experiment. You can have Azure
Machine Learning manage environment creation, and package installation
to define an environment, and then register it for reuse. Alternatively, you can manage your own environments
and register them. This makes it possible to define consistent reusable runtime contexts for
your experiments, regardless of where the
experiments script is run.